package com.turing.post.salesmanage.util;

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 充值单
 * 
 * @author zxppanda
 * 
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "DEPOSITORDER")
public class DepositOrder implements java.io.Serializable {

	/**
	 * 0 – 个人
	 */
	public static final String DEPORDER_BUYERTYPE_PERSON = "0";
	/**
	 * 1 – 单位
	 */
	public static final String DEPORDER_BUYERTYPE_COMPANY = "1";

	/**
	 * 0 单笔充值
	 */
	public static final String DEPORDER_DEPOSITTYPE_ONE = "0";
	/**
	 * 1 批量充值
	 */
	public static final String DEPORDER_DEPOSITTYPE_MORE = "1";
	/**
	 * 充值单状态
	 */
	/**
	 * 录入创建
	 */
	public static final String DEPORDER_ORDERSTATUS_INPUT = "0";
	/**
	 * 录入结束
	 */
	public static final String DEPORDER_ORDERSTATUS_INPUTCONFIRM = "1";
	/**
	 * 已付清
	 */
	public static final String DEPORDER_ORDERSTATUS_HAVEPAID = "2";
	/**
	 * 打包上送
	 */
	public static final String DEPORDER_ORDERSTATUS_Send = "3";
	/**
	 * 已充值
	 */
	public static final String DEPORDER_ORDERSTATUS_HAVERECHARGE = "4";
	// /**
	// * 已审核
	// */
	// public static final String DEPORDER_ORDERSTATUS_AUDITED = "5";
	/**
	 * 审核资金
	 */
	public static final String SaleOrder_OrderStatus_AuthMoney = "6";
	/**
	 * 已取消
	 */
	public static final String DEPORDER_ORDERSTATUS_CANCEL = "C";
	/**
	 * 按钮状态
	 */
	public static final String BtnStatus_Edit = "Edit"; // 修改
	public static final String BtnStatus_Cancel = "Cancel"; // 取消
	public static final String BtnStatus_Sales = "Sales"; // 绑定销售员
	public static final String BtnStatus_InputConfirm = "InputConfirm"; // 录入确认
	public static final String BtnStatus_InputConfirmCancel = "InputConfirmCancel";// 录入确认下取消
	public static final String BtnStatus_Paid = "Paid";// 充值单付款
	public static final String BtnStatus_PaidOff = "PaidOff";// 付清
	public static final String BtnStatus_PaidOffCancel = "PaidOffCancel";// 付清撤销

	public static final String BtnStatus_Account = "Account";// 充值单记账
	public static final String BtnStatus_AccountCan = "AccountCan";// 充值单记账撤销
	public static final String BtnStatus_Auth = "Auth";// 充值单审核
	public static final String BtnStatus_AuthCan = "AuthCan";// 充值单审核撤销

	private BigInteger depositOrderId;
	private String saleOrderSeqNo;
	private String openBranchNo;// 开户机构号
	private String saleBranchNo;//
	private String buyerType;
	private BigInteger personalBuyerId;// 个人信息
	private BigInteger organizeBuyerId;// 单位信息
	private BigInteger proxyBuyerId;// 代理人信息
	private Date tranDate;
	private Date depositTime;// 充值时间 精确到秒
	private BigInteger totalDepositAmount;// 总充值金额>=0,初始为0
	private BigInteger alreayPaidAmount;// 总付款金额 decimal(16) Not Null >= 0,初始为0
	private String depositType;// 充值类型 Char（1） Not Null 0 单笔充值 1 批量充值
	private String orderStatus;
	/**
	 * 提交凭证号 充值单提交上送时填写银行凭证号
	 */
	private BigInteger bankAccDetailId;
	/**
	 * 累计已核实资金
	 */
	private BigInteger totalCheckAmount;

	private String lastDepositMac;// 上次充值MAC varchar(40) Null 充值时更改
	private String lastDepositAccSeqNo;// 上次充值帐户子系统记帐流水号 varchar(40) Null 充值时更改
	private String lastCancelDepositAccSeqNo;// 上次充值撤销帐户子系统记帐流水号充值撤销时更改
	private BigInteger operId;// (FK) 操作员ID Int Not Null 参考SysOpUser
	private BigInteger authOperId;// ;终审人员 参考SysOpUser
	/**
	 * 柜员店长审核员ID 参考发卡商OrderAmountLimit限制输入
	 */
	private BigInteger autherOperId;
	private BigInteger fee;// 手续费 Number Not Null 默认0
	private BigInteger factFee;// 实际手续费 Number Not Null 默认0
	private BigInteger feeAuthOperId;// 实际手续费授权人 Int Null
	private BigInteger voucherId;// (UNI,FK) 凭证种类ID int Null 打印时更新
	private String voucherNo;// (UNI) 凭证号 Varchar（40） Null

	private String riskRemark;// 确认风险备注 varchar(60) Null
	private String remark;// 备注 varchar(60) Null

	private Date cancelDate;
	private Date cancelTime;
	private BigInteger cancelOperId;
	private BigInteger cancelAuthOperId;

	/**
	 * 上次充值记帐帐务日期
	 */
	private Date lastDepositDate;
	
	/**
	 * 上次取消充值记帐帐务日期
	 */
	private Date lastCancelDepositDate;
	
	private String btnStatus;

	public DepositOrder() {

	}

	@Id
	@Column(name = "DEPOSITORDERID")
	public BigInteger getDepositOrderId() {
		return depositOrderId;
	}

	public void setDepositOrderId(BigInteger depositOrderId) {
		this.depositOrderId = depositOrderId;
	}

	@Column(name = "saleOrderSeqNo")
	public String getSaleOrderSeqNo() {
		return saleOrderSeqNo;
	}

	public void setSaleOrderSeqNo(String saleOrderSeqNo) {
		this.saleOrderSeqNo = saleOrderSeqNo;
	}

	@Column(name = "SALEBRANCHNO")
	public String getSaleBranchNo() {
		return saleBranchNo;
	}

	public void setSaleBranchNo(String saleBranchNo) {
		this.saleBranchNo = saleBranchNo;
	}

	@Column(name = "openBranchNo")
	public String getOpenBranchNo() {
		return openBranchNo;
	}

	public void setOpenBranchNo(String openBranchNo) {
		this.openBranchNo = openBranchNo;
	}

	@Column(name = "BUYERTYPE")
	public String getBuyerType() {
		return buyerType;
	}

	public void setBuyerType(String buyerType) {
		this.buyerType = buyerType;
	}

	@Column(name = "PERSONALBUYERID")
	public BigInteger getPersonalBuyerId() {
		return personalBuyerId;
	}

	public void setPersonalBuyerId(BigInteger personalBuyerId) {
		this.personalBuyerId = personalBuyerId;
	}

	@Column(name = "ORGANIZEBUYERID")
	public BigInteger getOrganizeBuyerId() {
		return organizeBuyerId;
	}

	public void setOrganizeBuyerId(BigInteger organizeBuyerId) {
		this.organizeBuyerId = organizeBuyerId;
	}

	@Column(name = "PROXYBUYERID")
	public BigInteger getProxyBuyerId() {
		return proxyBuyerId;
	}

	public void setProxyBuyerId(BigInteger proxyBuyerId) {
		this.proxyBuyerId = proxyBuyerId;
	}

	@Column(name = "tranDate")
	public Date getTranDate() {
		return tranDate;
	}

	public void setTranDate(Date tranDate) {
		this.tranDate = tranDate;
	}

	@Column(name = "DEPOSITTIME")
	public Date getDepositTime() {
		return depositTime;
	}

	public void setDepositTime(Date depositTime) {
		this.depositTime = depositTime;
	}

	@Column(name = "TOTALDEPOSITAMOUNT")
	public BigInteger getTotalDepositAmount() {
		return totalDepositAmount;
	}

	public void setTotalDepositAmount(BigInteger totalDepositAmount) {
		this.totalDepositAmount = totalDepositAmount;
	}

	@Column(name = "ALREAYPAIDAMOUNT")
	public BigInteger getAlreayPaidAmount() {
		return alreayPaidAmount;
	}

	public void setAlreayPaidAmount(BigInteger alreayPaidAmount) {
		this.alreayPaidAmount = alreayPaidAmount;
	}

	@Column(name = "DEPOSITTYPE")
	public String getDepositType() {
		return depositType;
	}

	public void setDepositType(String depositType) {
		this.depositType = depositType;
	}

	@Column(name = "ORDERSTATUS")
	public String getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(String orderStatus) {
		this.orderStatus = orderStatus;
	}

	@Column(name = "bankAccDetailId")
	public BigInteger getBankAccDetailId() {
		return bankAccDetailId;
	}

	public void setBankAccDetailId(BigInteger bankAccDetailId) {
		this.bankAccDetailId = bankAccDetailId;
	}

	@Column(name = "totalCheckAmount")
	public BigInteger getTotalCheckAmount() {
		return totalCheckAmount;
	}

	public void setTotalCheckAmount(BigInteger totalCheckAmount) {
		this.totalCheckAmount = totalCheckAmount;
	}

	@Column(name = "LASTDEPOSITMAC")
	public String getLastDepositMac() {
		return lastDepositMac;
	}

	public void setLastDepositMac(String lastDepositMac) {
		this.lastDepositMac = lastDepositMac;
	}

	@Column(name = "LASTDEPOSITACCSEQNO")
	public String getLastDepositAccSeqNo() {
		return lastDepositAccSeqNo;
	}

	public void setLastDepositAccSeqNo(String lastDepositAccSeqNo) {
		this.lastDepositAccSeqNo = lastDepositAccSeqNo;
	}

	@Column(name = "LASTCANCELDEPOSITACCSEQNO")
	public String getLastCancelDepositAccSeqNo() {
		return lastCancelDepositAccSeqNo;
	}

	public void setLastCancelDepositAccSeqNo(String lastCancelDepositAccSeqNo) {
		this.lastCancelDepositAccSeqNo = lastCancelDepositAccSeqNo;
	}

	@Column(name = "OPERID")
	public BigInteger getOperId() {
		return operId;
	}

	public void setOperId(BigInteger operId) {
		this.operId = operId;
	}

	@Column(name = "AUTHOPERID")
	public BigInteger getAuthOperId() {
		return authOperId;
	}

	public void setAuthOperId(BigInteger authOperId) {
		this.authOperId = authOperId;
	}

	@Column(name = "AUTHEROPERID")
	public BigInteger getAutherOperId() {
		return autherOperId;
	}

	public void setAutherOperId(BigInteger autherOperId) {
		this.autherOperId = autherOperId;
	}

	@Column(name = "fee")
	public BigInteger getFee() {
		return fee;
	}

	public void setFee(BigInteger fee) {
		this.fee = fee;
	}

	@Column(name = "factFee")
	public BigInteger getFactFee() {
		return factFee;
	}

	public void setFactFee(BigInteger factFee) {
		this.factFee = factFee;
	}

	@Column(name = "feeAuthOperId")
	public BigInteger getFeeAuthOperId() {
		return feeAuthOperId;
	}

	public void setFeeAuthOperId(BigInteger feeAuthOperId) {
		this.feeAuthOperId = feeAuthOperId;
	}

	@Column(name = "voucherId")
	public BigInteger getVoucherId() {
		return voucherId;
	}

	public void setVoucherId(BigInteger voucherId) {
		this.voucherId = voucherId;
	}

	@Column(name = "voucherNo")
	public String getVoucherNo() {
		return voucherNo;
	}

	public void setVoucherNo(String voucherNo) {
		this.voucherNo = voucherNo;
	}

	@Column(name = "RISKREMARK")
	public String getRiskRemark() {
		return riskRemark;
	}

	public void setRiskRemark(String riskRemark) {
		this.riskRemark = riskRemark;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "cancelDate")
	public Date getCancelDate() {
		return cancelDate;
	}

	public void setCancelDate(Date cancelDate) {
		this.cancelDate = cancelDate;
	}

	@Column(name = "cancelTime")
	public Date getCancelTime() {
		return cancelTime;
	}

	public void setCancelTime(Date cancelTime) {
		this.cancelTime = cancelTime;
	}

	@Column(name = "cancelOperId")
	public BigInteger getCancelOperId() {
		return cancelOperId;
	}

	public void setCancelOperId(BigInteger cancelOperId) {
		this.cancelOperId = cancelOperId;
	}

	@Column(name = "cancelAuthOperId")
	public BigInteger getCancelAuthOperId() {
		return cancelAuthOperId;
	}

	public void setCancelAuthOperId(BigInteger cancelAuthOperId) {
		this.cancelAuthOperId = cancelAuthOperId;
	}

	/**
	 * 查询列表按钮返回状态
	 * 
	 * @return
	 */
	@Transient
	public String getBtnStatus() {
		return btnStatus;
	}

	public void setBtnStatus(String btnStatus) {
		this.btnStatus = btnStatus;
	}

	public void setLastDepositDate(Date lastDepositDate) {
		this.lastDepositDate = lastDepositDate;
	}

	public Date getLastDepositDate() {
		return lastDepositDate;
	}

	public void setLastCancelDepositDate(Date lastCancelDepositDate) {
		this.lastCancelDepositDate = lastCancelDepositDate;
	}

	public Date getLastCancelDepositDate() {
		return lastCancelDepositDate;
	}
}